/**
 * @Author George.
 * @Date 2018/8/29.
 * @Description: .server层 提供接口调用
 */
import {
    API
} from "./config";
import $UniResource from "../js/HttpRequest";

class InterServer {
    constructor() {
        this.sendSmsCheckCode = $UniResource.get(API.sendSmsCheckCode); // 发送短信
        this.checkMessageCode = $UniResource.get(API.checkMessageCode); //验证验证码是否有效 
        this.teamwork = $UniResource.save(API.teamwork); //成为合伙人  userAdd
        this.userAdd = $UniResource.save(API.userAdd); //入驻资料提交   
        this.uploadImg = $UniResource.save(API.uploadImg); //入驻资料图片提交

        this.consultantListById = $UniResource.get(API.consultantListById); //查看顾问详情
        this.login = $UniResource.get(API.login); //实现登录注册

        this.knowType = $UniResource.get(API.knowType); //知识库类别 
        this.knowList = $UniResource.get(API.knowList); //知识库列表
        this.knowDetails = $UniResource.get(API.knowDetails); //知识库知识详情  
        this.knowSwiper = $UniResource.get(API.knowSwiper); //知识库轮播图

        this.advisoryList = $UniResource.get(API.advisoryList); //咨询展示 

        this.getLoanType = $UniResource.get(API.getLoanType); //查询贷款种类 
        this.getLoanAll = $UniResource.save(API.getLoanAll); //查询贷款种类   
        this.getLoanDetails = $UniResource.get(API.getLoanDetails); //贷款详情 
        this.loanApply = $UniResource.save(API.loanApply); //贷款申请 listExpert
        this.listExpert = $UniResource.save(API.listExpert); //顾问列表
        this.consultantListAll = $UniResource.save(API.consultantListAll); //顾问评论列表  
        this.advisoryCommentl = $UniResource.save(API.advisoryCommentl); //对专家进行关注
        this.mark = $UniResource.get(API.mark); //对专家进行评论 
        this.getMarkLoan = $UniResource.save(API.getMarkLoan); //查看我的关注

        this.advisoryList = $UniResource.get(API.advisoryList); //我的咨询 
        this.advisoryRecord = $UniResource.get(API.advisoryRecord); //咨询电话记录
        this.loanIntent = $UniResource.save(API.loanIntent); //快捷电话
        this.examineCheck = $UniResource.get(API.examineCheck) //判断审核是否通过

        this.area = $UniResource.get(API.area); //获取地区

        this.getUid = $UniResource.get(API.getUid); //获取Uid
        this.onLineUsers = $UniResource.get(API.onLineUsers); //获取在线人数
        this.getHistoryMessage = $UniResource.get(API.getHistoryMessage) //获取聊天信息

        // 2022/02/15 后新增功能
        this.loginTest = $UniResource.get('/apinode/user/login-test'); //查看登录状态
        this.loginNew = $UniResource.save('/apinode/user/login'); //新登录
    }
}

export default new InterServer()